Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to export output to csv, json or HTML #29

Merged
merged 6 commits into from
Dec 12, 2024
Merged

Conversation

tacgomes
Copy link
Owner

@tacgomes tacgomes commented Dec 5, 2024

Add support to export output to csv, json or HTML. Closes #15.

@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines Coverage Δ
src/investir/cli.py 100.00% <100.00%> (ø)
src/investir/prettytable.py 100.00% <100.00%> (ø)
src/investir/taxcalculator.py 100.00% <ø> (ø)
src/investir/trhistory.py 100.00% <100.00%> (ø)

Split lines before comparing captured output against expected output. On
Microsoft Windows, the CSV output will use "\r\n" as line separator,
which is different than the "\n" stored in the files containing the
expected output. By using `.splitlines()` the platform-dependent line
separators are removed and the content can be compared for equality
independently of in which platform was produced.
Improve the hidden fields functionality by passing the list of hidden
fields in the constructor instead of requiring a separate method for
that effect.
Add support for showing totals for certain fields to the PrettyTable
class and update codebase to use the new feature.
@tacgomes tacgomes marked this pull request as ready for review December 12, 2024 19:30
@tacgomes tacgomes merged commit 362a5ef into main Dec 12, 2024
29 checks passed
@tacgomes tacgomes deleted the output-format branch December 12, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to export the tabular data to a CSV file
2 participants